This tutorial will take you through the process of creating a
VRML 2.0 world involving some simple behaviors.
In this exercise, we'll create a sphere which changes color each time
the user clicks on it. In this way, we
can make the ball change its color interactively -- something not possible
in VRML 1.0. Here are some
screen shots of the final result (the headlight feature of the
browser is turned on):
When developing for Community Place, we always need to create the
following:
- The VRML 2.0 files themselves -- these define the geometry
involved in the scene, and describe how the script files interact
with them. These files end with the extension .wrl.
- The Java programs. These describe how the objects in the scene
should behave. We use the Java language because this gives us a
powerful way to describe and program whatever our imagination
leads us to. These programs start with source code which ends with
the extension .java, which are then compiled (using Sun's
Java Development Kit) into bytecode files which end with the
extension .class.
This tutorial consists of:
- A discussion of the source code,
- An active example of this world (coming soon!), and
- Exercises for you to try on your own.
Written by John D. DeCuir